<template>
    <div class="main">
        <div class="router">
            <router-view></router-view>
        </div>
        
    </div>
</template>

<script>
export default {

    data(){
        return{
            scrollTop:0
        }
    },
    methods:{
       
        goNextPage(){
            if (sessionStorage.getItem('routeNow')!==null){
                this.$router.push({
                path:sessionStorage.getItem('routeNow')
                });
            }else {
                this.$router.push('/index');
            }
           
            
        }
    },
    created(){
        this.goNextPage();

    },
    watch:{
        $route(newVal,oldVal){
            sessionStorage.setItem('routeNow',this.$route.path);
        }
    }

}
</script>

<style scoped>
.main{
    min-height: 100vh;
    background-color: rgb(255, 105, 0);
}
.router{
    animation: fadeIn 2s;
}

</style>